﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="coursetry.aspx.cs" Inherits="LabMS.Web.coursetry" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
   <link href="../../css/screen.css" rel="stylesheet" type="text/css" />
    <link href="../../css/jquery.wysiwyg.css" rel="stylesheet" type="text/css" /> 
</head>
<body>
    <form id="form1" runat="server">
        <div id="ui">
            <table>
                <tr>
                    <td>
                        周次 
                    </td>
                     <td>
                         <asp:DropDownList ID="ddlWeekSelect" runat="server">
                                <asp:ListItem Text=" " Value="0"></asp:ListItem> 
                                <asp:ListItem Text="全选" Value="1"></asp:ListItem> 
                                <asp:ListItem Text="单周" Value="2"></asp:ListItem> 
                                <asp:ListItem Text="双周" Value="3"></asp:ListItem> 
                         </asp:DropDownList>
                    </td>
                    <td>
                        <asp:Label ID="lbWeeks" runat="server" Text="Label"></asp:Label>
                    </td> 
                </tr> 
            </table>
          <asp:Label ID="lbDayAndClass" runat="server" Text="Label"></asp:Label>
        </div>
        <script type="text/javascript" src="../../js/jQuery/jquery-1.3.1.js"></script>

        <script type="text/javascript" src="../../js/jQuery/jquery.json-1.3.min.js"></script>
        <script type="text/javascript">
        $("#ddlWeekSelect").change( 
            function() {
                             var strselect = $("#ddlWeekSelect").val();
                             if(strselect=="0")
                             {
                                $("#lbWeeks :checkbox").attr("checked", false);
                             }
                             if(strselect=="1")
                             {
                                $("#lbWeeks :checkbox").attr("checked", true);
                             }
                             if(strselect=="2")
                             {
                                $("#lbWeeks :checkbox").attr("checked", false);
                                for(var i=0; i<20; i++)
                                {
                                    if(i%2==0)
                                   {
                                         $("#chkWeek"+i).attr("checked", true);
                                   }  
                                }
                             }
                             if(strselect=="3")
                             {
                                $("#lbWeeks :checkbox").attr("checked", false);
                                for(var i=0; i<20; i++)
                                {
                                    if(i%2==1)
                                   {
                                         $("#chkWeek"+i).attr("checked", true);
                                   }  
                                }
                             }
                            }); 

        </script>

    </form>
</body>
</html>
